package com.chinasofti.shoot;
//子弹
public class Bullet extends FlyingObject {
    private  int speed = 3;//走步的步数

    public Bullet(int x , int y){
        imge=ShootGame.bullet;
        width = imge.getWidth();
        height = imge.getHeight();
        this.x=x;//子弹随着英雄机移动
        this.y =y;//子弹随着英雄机移动
    }

    @Override
    public void step() {
        y-=speed;
    }

    @Override
    public boolean outOfBounds() {
        return this.y<0;
    }
}
